(defun Hesperus-perl-eval ()
  "Run selected region as Perl code"
  (interactive)
  (shell-command-on-region (mark) (point) "perl "))

(add-hook 'cperl-mode-hook
          (lambda ()
            (local-set-key (kbd "<f8>") 'Hesperus-perl-eval)))

(provide 'init-perl)
